package file.day9_17;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("fos.dat");
        fos.write(4);
        fos.write(7);
        File file = new File("fos.dat");
        System.out.println((Long)file.length());
        System.out.println(file.canRead());
        System.out.println(file.canWrite());
        System.out.println("写出完毕");
        fos.close();
    }
}
